module MembersHelper
  def astro date
    month = date.month
    day = date.day
    astro_list = ['魔羯座','水瓶座','双鱼座','白羊座','金牛座','双子座','巨蟹座','狮子座','处女座','天秤座','天蝎座','射手座','魔羯座']
    last_day_list = [20,19,20,20,21,21,22,23,23,23,22,21]
    astro_list[month-(day<=last_day_list[month-1]?1:0)]
  end

  def member_big_avatar_url member
    if member.avatars.blank?
      "/avatars/noavatar_big.gif"
    else
      member.avatars.last.public_filename(:big)
    end
  end

  def member_small_avatar_url member
    if member.avatars.blank?
      "/avatars/noavatar_thumb.gif"
    else
      member.avatars.last.public_filename(:small)
    end
  end
  
end
